package fr.psm.service.common;

import java.io.Serializable;
import java.util.List;

import fr.psm.dao.common.GenericDao;

public class GenericServiceImpl<T, ID extends Serializable> implements
		GenericService<T, ID> {

	protected GenericDao<T, ID> genericDao;

	/**
	 * 
	 * @param genericDao
	 */
	public GenericServiceImpl(GenericDao<T, ID> genericDao) {
		this.genericDao = genericDao;
	}

	public List<T> getAll() {
		return genericDao.getAll();
	}

	public T findByID(ID id) {
		return genericDao.findById(id);
	}

	@Override
	public void save(T object, ID id) {
		genericDao.save(object, id);
	}

	@Override
	public void deleteById(T object, ID id) {
		genericDao.deleteById(object, id);
		
	}
}
